package com.javasm.service.impl;

import com.javasm.dao.Impl.userDaoImpl;
import com.javasm.dao.userDao;
import com.javasm.entity.User;
import com.javasm.service.LoginService;

public class LoginServiceImpl implements LoginService {
    @Override
    public User login(String Username, String password) {
        userDao userDao1 = new userDaoImpl();
        User loginuser = userDao1.getUserByNameAndPassword(Username, password);
        if(loginuser!=null){
            loginuser.setUsername("亲爱的上帝"+ loginuser.getUsername());
        }
        return loginuser;

    }
}
